package com.yiji.fintech.musfinance.base.enums;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public enum ProductTypeEnum {

	ALIPAY("003", "支付宝"),

	WEIXIN("004", "微信");

	/**
	 * 枚举值
	 */
	private final String code;

	/**
	 * 枚举描述
	 */
	private final String message;

	private ProductTypeEnum(String code, String message) {
		this.code = code;
		this.message = message;
	}

	/**
	 * @return Returns the code.
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @return Returns the message.
	 */
	public String getMessage() {
		return message;
	}

	/**
	 * @return Returns the code.
	 */
	public String code() {
		return code;
	}

	/**
	 * @return Returns the message.
	 */
	public String message() {
		return message;
	}

	public static Map<String, String> mapping() {
		Map<String, String> map = new LinkedHashMap<String, String>();
		for (ProductTypeEnum type : values()) {
			map.put(type.getCode(), type.getMessage());
		}
		return map;
	}
	public static List<ProductTypeEnum> getAllEnum() {
		List<ProductTypeEnum> list = new ArrayList();
		ProductTypeEnum[] var1 = values();
		int var2 = var1.length;

		for(int var3 = 0; var3 < var2; ++var3) {
			ProductTypeEnum _enum = var1[var3];
			list.add(_enum);
		}

		return list;
	}
}
